Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask: add Prometheus endpoint #983

Merged
merged 10 commits into from
Dec 10, 2021
Merged

Flask: add Prometheus endpoint #983

merged 10 commits into from
Dec 10, 2021

Conversation

kevinlul
Copy link
Collaborator

@kevinlul kevinlul commented Dec 9, 2021

This is to help gain insights for #950.
Leverage prometheus-flask-exporter, a high-level client atop Prometheus' Python client designed for Flask and Gunicorn.
Use /tmp for the multiprocess directory to temporarily write metrics for the manager process, which is always writable and reset when the container is recreated, as required.
Add alternate gunicorn configuration for testing this metrics setup without going straight into production.

Integrate entrypoints into Dockerfile, now that stager-dev is no longer needed.
Disable pip cache when building images to reduce image size.

@github-actions github-actions bot added backend Flask dependencies Pull requests that update a dependency file devops Docker, GitHubs Actions, CI/CD labels Dec 9, 2021
@kevinlul
Copy link
Collaborator Author

Merge conflict due to #974 resolved

Copy link
Contributor

@cklamann cklamann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kevinlul kevinlul merged commit 9452ebc into master Dec 10, 2021
@kevinlul kevinlul deleted the kevinlul/metrics branch December 10, 2021 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Flask dependencies Pull requests that update a dependency file devops Docker, GitHubs Actions, CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants